﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
namespace ChuanPlus
{
    public class Supplier : XPLiteObject
    {
        int fSupplierID;
        [Key(true)]
        public int SupplierID
        {
            get { return fSupplierID; }
            set { SetPropertyValue<int>("SupplierID", ref fSupplierID, value); }
        }
        string fSupplierName;
        public string SupplierName
        {
            get { return fSupplierName; }
            set { SetPropertyValue<string>("SupplierName", ref fSupplierName, value); }
        }
        string fSupplierAdd;
        [Size(SizeAttribute.Unlimited)]
        public string SupplierAdd
        {
            get { return fSupplierAdd; }
            set { SetPropertyValue<string>("SupplierAdd", ref fSupplierAdd, value); }
        }
        string fSupplierPhone;
        public string SupplierPhone
        {
            get { return fSupplierPhone; }
            set { SetPropertyValue<string>("SupplierPhone", ref fSupplierPhone, value); }
        }
        string fSupplierFax;
        public string SupplierFax
        {
            get { return fSupplierFax; }
            set { SetPropertyValue<string>("SupplierFax", ref fSupplierFax, value); }
        }
        double fSupplierDebt;
        public double SupplierDebt
        {
            get { return fSupplierDebt; }
            set { SetPropertyValue<double>("SupplierDebt", ref fSupplierDebt, value); }
        }
        public Supplier(Session session) : base(session) { }
        public Supplier() : base(Session.DefaultSession) { }
        /// <summary>
        /// Initializes a new instance of the Supplier class.
        /// </summary>
        /// <param name="fSupplierID"></param>
        /// <param name="fSupplierName"></param>
        /// <param name="fSupplierAdd"></param>
        /// <param name="fSupplierPhone"></param>
        /// <param name="fSupplierFax"></param>
        /// <param name="fSupplierDebt"></param>
        public Supplier(int fSupplierID, string fSupplierName, string fSupplierAdd, string fSupplierPhone, string fSupplierFax, double fSupplierDebt)
        {
            this.fSupplierID = fSupplierID;
            this.fSupplierName = fSupplierName;
            this.fSupplierAdd = fSupplierAdd;
            this.fSupplierPhone = fSupplierPhone;
            this.fSupplierFax = fSupplierFax;
            this.fSupplierDebt = fSupplierDebt;
        }
        public override void AfterConstruction() { base.AfterConstruction(); }
        public override string ToString()
        {
            return SupplierName;
        }
    }
}
